package com.mb.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 公共配置
 *
 * @author michael.li
 * @create 2018-03-24 下午3:08
 **/
@Component
@Configuration
public class CommonConfig {
	//签名key
	@Value("${mp.signKey}")
	private String signKey;

	//验证码模板ID
	@Value("${mp.sms.vcodeTplId}")
	private String vcodeTplId;

	//短信模板ID
	@Value("${mp.sms.auditTplId}")
	private String auditTplId;

	//短信模板ID
	@Value("${mp.sms.smsAppKey}")
	private String smsAppKey;

	//短信服务API地址
	@Value("${mp.sms.smsApiUrl}")
	private String smsApiUrl;

	//微信下单地址
	@Value("${pay.wxpay.unifiedorder_url}")
	private String wxPayUnifiedorderUrl;

	//微信退款地址
	@Value("${pay.wxpay.refund_url}")
	private String wxPayRefundUrl;

	//微信商户号
	@Value("${pay.wxpay.wx_mch_id}")
	private String wxMchId;

	//微信公众号appid
	@Value("${pay.wxpay.wx_appid}")
	private String wxAppId;

	//微信公众号secret
	@Value("${pay.wxpay.wx_secret}")
	private String wxSecret;

	//密钥文件路径
	@Value("${pay.wxpay.p12_path}")
	private String p12Path;

	//密钥文件密码
	@Value("${pay.wxpay.p12_pass}")
	private String p12Pass;

    /***** Wx APP Begin *******/
	//微信App商户号
	@Value("${pay.wxpay.wx_app_mch_id}")
	private String wxAppMchId;

	//微信App appid
	@Value("${pay.wxpay.wx_app_appid}")
	private String wxAppAppId;

	//微信App secret
	@Value("${pay.wxpay.wx_app_secret}")
	private String wxAppSecret;

	//微信App 商户API key
	@Value("${pay.wxpay.app_partner_key}")
	private String wxAppPartnerKey;

	//微信App密钥文件路径
	@Value("${pay.wxpay.app_p12_path}")
	private String wxAppP12Path;

	//微信App 密钥文件密码
	@Value("${pay.wxpay.app_p12_pass}")
	private String wxAppP12Pass;

	/*********** Wx APP End ************/


	//微信H5支付通知地址
	@Value("${pay.wxpay.h5_notify_url}")
	private String wxPayH5NotifyUrl;

	//微信扫支付通知地址
	@Value("${pay.wxpay.qrcode_notify_url}")
	private String wxPayQrcodeNotifyUrl;

	//支付宝H5支付跳转地址
	@Value("${pay.wxpay.h5_return_url}")
	private String wxpayH5ReturnUrl;

	//支付宝H5支付跳转地址
	@Value("${pay.wxpay.qrcode_return_url}")
	private String wxpayQrcodeReturnUrl;

	//商户API key
	@Value("${pay.wxpay.partner_key}")
	private String wxPartnerKey;

	//支付宝appid
	@Value("${pay.alipay.alipay_app_id}")
	private String alipayAppId;

	//支付宝合作伙伴身份
	@Value("${pay.alipay.alipay_pid}")
	private String alipayPId;

	//支付宝APP私钥
	@Value("${pay.alipay.app_private_key}")
	private String alipayAppPrivateKey;

	//支付宝公钥
	@Value("${pay.alipay.alipay_public_key}")
	private String alipayPublicKey;

	//支付宝H5支付通知地址
	@Value("${pay.alipay.h5_notify_url}")
	private String alipayH5NotifyUrl;

	//支付宝扫码支付通知地址
	@Value("${pay.alipay.qrcode_notify_url}")
	private String alipayQrcodeNotifyUrl;

	//支付宝扫码支付跳转地址
	@Value("${pay.alipay.qrcode_return_url}")
	private String alipayQrcodeReturnUrl;

	//支付宝H5支付跳转地址
	@Value("${pay.alipay.h5_return_url}")
	private String alipayH5ReturnUrl;

	//支付宝接口服务地址
	@Value("${pay.alipay.open_api_domain}")
	private String alipayopenApiDomain;

	public String getWxAppMchId() {
		return wxAppMchId;
	}

	public void setWxAppMchId(String wxAppMchId) {
		this.wxAppMchId = wxAppMchId;
	}

	public String getWxAppAppId() {
		return wxAppAppId;
	}

	public void setWxAppAppId(String wxAppAppId) {
		this.wxAppAppId = wxAppAppId;
	}

	public String getWxAppSecret() {
		return wxAppSecret;
	}

	public void setWxAppSecret(String wxAppSecret) {
		this.wxAppSecret = wxAppSecret;
	}

	public String getWxAppPartnerKey() {
		return wxAppPartnerKey;
	}

	public void setWxAppPartnerKey(String wxAppPartnerKey) {
		this.wxAppPartnerKey = wxAppPartnerKey;
	}

	public String getWxAppP12Path() {
		return wxAppP12Path;
	}

	public void setWxAppP12Path(String wxAppP12Path) {
		this.wxAppP12Path = wxAppP12Path;
	}

	public String getWxAppP12Pass() {
		return wxAppP12Pass;
	}

	public void setWxAppP12Pass(String wxAppP12Pass) {
		this.wxAppP12Pass = wxAppP12Pass;
	}

	public String getAlipayopenApiDomain() {
		return alipayopenApiDomain;
	}

	public void setAlipayopenApiDomain(String alipayopenApiDomain) {
		this.alipayopenApiDomain = alipayopenApiDomain;
	}

	//图片域名
	@Value("${imgDomain}")
	private String imgDomain;

	//图片根地址
	@Value("${imgRootPath}")
	private String imgRootPath;

	//签名方式
	@Value("${pay.alipay.sign_type}")
    private String alPaySignType;

	//当面付最大查询次数和查询间隔（毫秒）
	@Value("${pay.alipay.max_query_retry}")
	private int maxQueryRetry;

	//当面付最大查询次数和查询间隔（毫秒）
	@Value("${pay.alipay.query_duration}")
	private long queryDuration;

	//当面付最大撤销次数和撤销间隔（毫秒）
	@Value("${pay.alipay.max_cancel_retry}")
	private int maxCancelRetry;

	@Value("${pay.alipay.cancel_duration}")
	private long cancelDuration;

	//# 交易保障线程第一次调度延迟和调度间隔（秒）
	@Value("${pay.alipay.heartbeat_delay}")
	private long heartbeatDelay;

	@Value("${pay.alipay.heartbeat_duration}")
	private long heartbeatDuration;

	/********个推*********/
	@Value("${push.getui.appId}")
	private String getuiAppId;

	@Value("${push.getui.appKey}")
	private String getuiAppKey;

	@Value("${push.getui.masterSecret}")
	private String getuiMasterSecret;

	@Value("${push.getui.url}")
	private String getuiUrl;

	/********友盟*********/
	@Value("${push.umeng.appkey}")
	private String umengAppKey;

	@Value("${push.umeng.messageSecret}")
	private String umengMessageSecret;

	@Value("${push.umeng.masterSecret}")
	private String umengMasterSecret;

	//环境模式
    @Value("${spring.profiles.active}")
	private String profile;

    //阿里云AccessKey
	@Value("${aliyun.accessKeyId}")
    private String aliyunAccessKeyId;

	@Value("${aliyun.accessKeySecret}")
	private String aliyunAccessKeySecret;

	//信鸽android
	@Value("${push.xg.android.accessId}")
	private String androidAccessId;
	@Value("${push.xg.android.accessKey}")
	private String androidAccessKey;
	@Value("${push.xg.android.secretKey}")
	private String androidSecretKey;
	//信鸽ios
	@Value("${push.xg.ios.accessId}")
	private String iosAccessId;
	@Value("${push.xg.ios.accessKey}")
	private String iosAccessKey;
	@Value("${push.xg.ios.secretKey}")
	private String iosSecretKey;

	@Value("${map.amap_key}")
	private String amapKey;

	public String getAmapKey() {
		return amapKey;
	}

	public void setAmapKey(String amapKey) {
		this.amapKey = amapKey;
	}

	public String getAndroidAccessId() {
		return androidAccessId;
	}

	public void setAndroidAccessId(String androidAccessId) {
		this.androidAccessId = androidAccessId;
	}

	public String getAndroidAccessKey() {
		return androidAccessKey;
	}

	public void setAndroidAccessKey(String androidAccessKey) {
		this.androidAccessKey = androidAccessKey;
	}

	public String getAndroidSecretKey() {
		return androidSecretKey;
	}

	public void setAndroidSecretKey(String androidSecretKey) {
		this.androidSecretKey = androidSecretKey;
	}

	public String getIosAccessId() {
		return iosAccessId;
	}

	public void setIosAccessId(String iosAccessId) {
		this.iosAccessId = iosAccessId;
	}

	public String getIosAccessKey() {
		return iosAccessKey;
	}

	public void setIosAccessKey(String iosAccessKey) {
		this.iosAccessKey = iosAccessKey;
	}

	public String getIosSecretKey() {
		return iosSecretKey;
	}

	public void setIosSecretKey(String iosSecretKey) {
		this.iosSecretKey = iosSecretKey;
	}

	public String getAliyunAccessKeyId() {
		return aliyunAccessKeyId;
	}

	public void setAliyunAccessKeyId(String aliyunAccessKeyId) {
		this.aliyunAccessKeyId = aliyunAccessKeyId;
	}

	public String getAliyunAccessKeySecret() {
		return aliyunAccessKeySecret;
	}

	public void setAliyunAccessKeySecret(String aliyunAccessKeySecret) {
		this.aliyunAccessKeySecret = aliyunAccessKeySecret;
	}

	public String getProfile() {
        return profile;
    }

    public void setProfile(String profile) {
        this.profile = profile;
    }

    public String getUmengAppKey() {
		return umengAppKey;
	}

	public void setUmengAppKey(String umengAppKey) {
		this.umengAppKey = umengAppKey;
	}

	public String getUmengMessageSecret() {
		return umengMessageSecret;
	}

	public void setUmengMessageSecret(String umengMessageSecret) {
		this.umengMessageSecret = umengMessageSecret;
	}

	public String getUmengMasterSecret() {
		return umengMasterSecret;
	}

	public void setUmengMasterSecret(String umengMasterSecret) {
		this.umengMasterSecret = umengMasterSecret;
	}

	public String getGetuiAppId() {
		return getuiAppId;
	}

	public void setGetuiAppId(String getuiAppId) {
		this.getuiAppId = getuiAppId;
	}

	public String getGetuiAppKey() {
		return getuiAppKey;
	}

	public void setGetuiAppKey(String getuiAppKey) {
		this.getuiAppKey = getuiAppKey;
	}

	public String getGetuiMasterSecret() {
		return getuiMasterSecret;
	}

	public void setGetuiMasterSecret(String getuiMasterSecret) {
		this.getuiMasterSecret = getuiMasterSecret;
	}

	public String getGetuiUrl() {
		return getuiUrl;
	}

	public void setGetuiUrl(String getuiUrl) {
		this.getuiUrl = getuiUrl;
	}

	public String getAlPaySignType() {
		return alPaySignType;
	}

	public void setAlPaySignType(String alPaySignType) {
		this.alPaySignType = alPaySignType;
	}

	public int getMaxQueryRetry() {
		return maxQueryRetry;
	}

	public void setMaxQueryRetry(int maxQueryRetry) {
		this.maxQueryRetry = maxQueryRetry;
	}

	public long getQueryDuration() {
		return queryDuration;
	}

	public void setQueryDuration(long queryDuration) {
		this.queryDuration = queryDuration;
	}

	public int getMaxCancelRetry() {
		return maxCancelRetry;
	}

	public void setMaxCancelRetry(int maxCancelRetry) {
		this.maxCancelRetry = maxCancelRetry;
	}

	public long getCancelDuration() {
		return cancelDuration;
	}

	public void setCancelDuration(long cancelDuration) {
		this.cancelDuration = cancelDuration;
	}

	public long getHeartbeatDelay() {
		return heartbeatDelay;
	}

	public void setHeartbeatDelay(long heartbeatDelay) {
		this.heartbeatDelay = heartbeatDelay;
	}

	public long getHeartbeatDuration() {
		return heartbeatDuration;
	}

	public void setHeartbeatDuration(long heartbeatDuration) {
		this.heartbeatDuration = heartbeatDuration;
	}

	public String getWxPartnerKey() {
		return wxPartnerKey;
	}

	public void setWxPartnerKey(String wxPartnerKey) {
		this.wxPartnerKey = wxPartnerKey;
	}

	public String getWxPayUnifiedorderUrl() {
		return wxPayUnifiedorderUrl;
	}

	public void setWxPayUnifiedorderUrl(String wxPayUnifiedorderUrl) {
		this.wxPayUnifiedorderUrl = wxPayUnifiedorderUrl;
	}

	public String getWxPayRefundUrl() {
		return wxPayRefundUrl;
	}

	public void setWxPayRefundUrl(String wxPayRefundUrl) {
		this.wxPayRefundUrl = wxPayRefundUrl;
	}

	public String getImgDomain() {
		return imgDomain;
	}

	public void setImgDomain(String imgDomain) {
		this.imgDomain = imgDomain;
	}

	public String getImgRootPath() {
		return imgRootPath;
	}

	public void setImgRootPath(String imgRootPath) {
		this.imgRootPath = imgRootPath;
	}

	public String getWxpayQrcodeReturnUrl() {
		return wxpayQrcodeReturnUrl;
	}

	public void setWxpayQrcodeReturnUrl(String wxpayQrcodeReturnUrl) {
		this.wxpayQrcodeReturnUrl = wxpayQrcodeReturnUrl;
	}

	public String getAlipayQrcodeReturnUrl() {
		return alipayQrcodeReturnUrl;
	}

	public void setAlipayQrcodeReturnUrl(String alipayQrcodeReturnUrl) {
		this.alipayQrcodeReturnUrl = alipayQrcodeReturnUrl;
	}

	public String getWxMchId() {
		return wxMchId;
	}

	public void setWxMchId(String wxMchId) {
		this.wxMchId = wxMchId;
	}

	public String getWxAppId() {
		return wxAppId;
	}

	public void setWxAppId(String wxAppId) {
		this.wxAppId = wxAppId;
	}

	public String getWxSecret() {
		return wxSecret;
	}

	public void setWxSecret(String wxSecret) {
		this.wxSecret = wxSecret;
	}

	public String getP12Path() {
		return p12Path;
	}

	public void setP12Path(String p12Path) {
		this.p12Path = p12Path;
	}

	public String getP12Pass() {
		return p12Pass;
	}

	public void setP12Pass(String p12Pass) {
		this.p12Pass = p12Pass;
	}

	public String getWxPayH5NotifyUrl() {
		return wxPayH5NotifyUrl;
	}

	public void setWxPayH5NotifyUrl(String wxPayH5NotifyUrl) {
		this.wxPayH5NotifyUrl = wxPayH5NotifyUrl;
	}

	public String getWxPayQrcodeNotifyUrl() {
		return wxPayQrcodeNotifyUrl;
	}

	public void setWxPayQrcodeNotifyUrl(String wxPayQrcodeNotifyUrl) {
		this.wxPayQrcodeNotifyUrl = wxPayQrcodeNotifyUrl;
	}

	public String getWxpayH5ReturnUrl() {
		return wxpayH5ReturnUrl;
	}

	public void setWxpayH5ReturnUrl(String wxpayH5ReturnUrl) {
		this.wxpayH5ReturnUrl = wxpayH5ReturnUrl;
	}

	public String getAlipayAppId() {
		return alipayAppId;
	}

	public void setAlipayAppId(String alipayAppId) {
		this.alipayAppId = alipayAppId;
	}

	public String getAlipayPId() {
		return alipayPId;
	}

	public void setAlipayPId(String alipayPId) {
		this.alipayPId = alipayPId;
	}

	public String getAlipayAppPrivateKey() {
		return alipayAppPrivateKey;
	}

	public void setAlipayAppPrivateKey(String alipayAppPrivateKey) {
		this.alipayAppPrivateKey = alipayAppPrivateKey;
	}

	public String getAlipayPublicKey() {
		return alipayPublicKey;
	}

	public void setAlipayPublicKey(String alipayPublicKey) {
		this.alipayPublicKey = alipayPublicKey;
	}

	public String getAlipayH5NotifyUrl() {
		return alipayH5NotifyUrl;
	}

	public void setAlipayH5NotifyUrl(String alipayH5NotifyUrl) {
		this.alipayH5NotifyUrl = alipayH5NotifyUrl;
	}

	public String getAlipayQrcodeNotifyUrl() {
		return alipayQrcodeNotifyUrl;
	}

	public void setAlipayQrcodeNotifyUrl(String alipayQrcodeNotifyUrl) {
		this.alipayQrcodeNotifyUrl = alipayQrcodeNotifyUrl;
	}

	public String getAlipayH5ReturnUrl() {
		return alipayH5ReturnUrl;
	}

	public void setAlipayH5ReturnUrl(String alipayH5ReturnUrl) {
		this.alipayH5ReturnUrl = alipayH5ReturnUrl;
	}

	public String getSmsApiUrl() {
		return smsApiUrl;
	}

	public void setSmsApiUrl(String smsApiUrl) {
		this.smsApiUrl = smsApiUrl;
	}

	public String getSmsAppKey() {
		return smsAppKey;
	}

	public void setSmsAppKey(String smsAppKey) {
		this.smsAppKey = smsAppKey;
	}

	public String getSignKey() {
		return signKey;
	}

	public void setSignKey(String signKey) {
		this.signKey = signKey;
	}

	public String getVcodeTplId() {
		return vcodeTplId;
	}

	public void setVcodeTplId(String vcodeTplId) {
		this.vcodeTplId = vcodeTplId;
	}

	public String getAuditTplId() {
		return auditTplId;
	}

	public void setAuditTplId(String auditTplId) {
		this.auditTplId = auditTplId;
	}

	public String getCharset(){
		return "UTF-8";
	}

}
